//
//@File    :	13.16_usedma.cpp
//@Time    :	2022/01/19 15:17:08
//@Auther  :	Sun Sheng
//@Contact :	970340843@qq.com
//@Desc    :	inheritance,friends ,and DMA
//

//compile with dma.cpp
#include <iostream>
#include "13.14_dma.h"

int main()
{
    using std::cout;
    using std::endl;

    baseDMA shirt("Portabelly",8);
    lacksDMA balloon("red","Blimpo",4);
    hasDMA map("Mercator","Buffalo Kets",5);

    cout<<"Displaying baseDMA object:\n";
    cout<<shirt<<endl;
    cout<<"Displaying lacksDMA object:\n";
    cout<<balloon<<endl;
    cout<<"Displaying hasDMA object:\n";
    cout<<map<<endl;
    lacksDMA balloon2(balloon);//复制构造函数
    cout<<"Result of lacksDMA copy:\n";
    cout<<balloon2<<endl;
    hasDMA map2;
    map2=map;//运算符重载 ,赋值
    cout<<"Result of hasDMA assignment:\n";
    cout<<map2<<endl;
    system("pause");
    return 0;
}
